package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 梦龙
 * @date 2023/12/7 19:56
 */
@Mapper
public interface OrderDetailMapper {
    /**
     * @description:批量插入订单明细数据
     * @return: void
     * @author: 梦龙
     * @time: 2023/12/7 21:13
     */
    void insertBatch(List<OrderDetail> orderDetails);

    /**
     * @description:查询订单详情
     * @return: java.util.List<com.sky.entity.OrderDetail>
     * @author: 梦龙
     * @time: 2023/12/10 16:51
     */
    @Select("select * from order_detail where order_id = #{ordersId}")
    List<OrderDetail> getByOrdersId(Long ordersId);
}
